/*
 * $Id$
 */
package py.windmill.resolution;

import py.windmill.action.MimeType;
import py.windmill.action.Request;

/**
 *
 * @author myang
 */
public class Redirect extends ResolutionSupport {

    private String _target;
    /**
     * 
     * @param target 
     */
    public Redirect(final String target) {
        super(MimeType.HTML);
        _target = target;
    }

    @Override
    public void execute(final Request req, final Object val) {
        req.response().redirect(_target);
    }

    @Override
    public boolean isAcceptedBy(final Request req) {
        return true;
    }
}
